<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        str = `<div>
<h2>HTML DOM 树</h2>
<img src="/i/ct_htmltree.gif" alt="HTML DOM Node Tree" />
</div>`;

        // 编写正则表达式，提取出字符串中图片的路径
        //      /   字母    /   字母或者下划线若干   .     字母若干
        //      ^\/   \w+   \/    \w+            \.         \w{3,4}$
        var imag =/\/\w+\/[\w]+\.[\w]{3,4}/;
        console.log(str.match(imag));

    </script>
</head>
<body>
<a href="">ssss</a>
</body>
</html>